@echo off
call "%VS120COMNTOOLS%\vsvars32.bat"

rem SET ECHO=echo
rem SET PAUSE=pause

SET BUILD_LOG=%~dp0Logs\Build.log

SET MSBUILD=msbuild.exe

SET MSBUILD_INPUT=%~dp0..\Mjollnir.sln

SET NUGET=%~dp0..\.nuget\NuGet.exe
SET NUGET_LOG=%~dp0Logs\NuGet.log

SET NUGET_INPUT=%~dp0NuPkg.nuspec
SET NUGET_OUTPUT=%~dp0bin\Release

%ECHO% "%MSBUILD%" "%MSBUILD_INPUT%" /m /p:Configuration=Release 1>"%BUILD_LOG%" 2>&1

%ECHO% "%NUGET%" update -Self 1>>"%BUILD_LOG%" 2>&1
%ECHO% "%NUGET%" pack "%NUGET_INPUT%" -OutputDirectory "%NUGET_OUTPUT%" 1>>"%BUILD_LOG%" 2>&1

%PAUSE%
